﻿/*-------------------------------------------------------------------------
* 命名空间: WaferSelectV3.DAL/DataContext
* 类       名: DataContext
* 功      能:  TD
* 时      间:  2024/5/5 15:25:13
* 版      本:  V1.0
* 作      者:  Fioman
* 格      言:  Talk is cheap,show me the code ^_^
*-------------------------------------------------------------------------*/
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WaferSelectV3.DAL.DataEntity;

namespace WaferSelectV3.DAL
{
    public class DataContext : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            base.OnConfiguring(optionsBuilder);
            string connStr = @"Server=.\;Database=WaferSelectV3;User Id=Fioman;Password=112233;Trusted_Connection=True;TrustServerCertificate=True;";
            optionsBuilder.UseSqlServer(connStr);
        }

        /// <summary>
        /// 当前正在作业的工作信息表
        /// </summary>
        public DbSet<WorkingInfoEntity> WorkingInfos { get; set; }
        /// <summary>
        /// 晶棒信息统计表
        /// </summary>
        public DbSet<CrystalLevelCountEntity> CrystalLevelCounts { get; set; }
        /// <summary>
        /// 等级以及等级对应的数量的统计表
        /// </summary>
        public DbSet<LevelCountHistoryEntity> LevelCountsHistory { get; set; }
        /// <summary>
        /// 从站通信参数表
        /// </summary>
        public DbSet<SlaveParamsEntity> SlaveParams { get; set; }
        /// <summary>
        /// 视觉和电阻率数据修正补偿表
        /// </summary>
        public DbSet<VisionOffsetEntity> VisionOffsets { get; set; }
        /// <summary>
        /// 模块屏蔽状态表
        /// </summary>
        public DbSet<ModuleShieldEntity> ModuleShields { get; set; }
        /// <summary>
        /// 料盒状态表
        /// </summary>
        public DbSet<BoxStateEntity> BoxStates { get; set; }
        /// <summary>
        /// 用户管理信息表
        /// </summary>
        public DbSet<UserEntity> UserInfos { get; set; }
        /// <summary>
        /// 汇总表(虽然表明是变动的,但是查询的时候可以用这个变量来作为容器去承载结果汇总内容)
        /// </summary>
        public DbSet<WaferSummaryEntity> WaferSummaries { get; set; }

    }
}
